package com.zhuimeng.Application.contorller;


import com.zhuimeng.Application.entity.HappyBeanHistory;
import com.zhuimeng.Application.service.IHappyBeanHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/happybean")
public class HappyBeanController {

    @Autowired
    private IHappyBeanHistoryService happyBeanHistoryService;

    @RequestMapping("/querylist")
    public List<HappyBeanHistory> happyBeanHistories(Integer uid) {
        return happyBeanHistoryService.queryHistoryByUid(uid);
    }
}
